/* 
 * File:   standard_in_repository_entity.hpp
 * Author: jolo
 *
 * Created on 11. Oktober 2011, 00:28
 */

#ifndef STANDARD_IN_REPOSITORY_ENTITY_HPP
#define	STANDARD_IN_REPOSITORY_ENTITY_HPP

#include "in_repository_entity.hpp"

namespace model
{

    class standard_in_repository_entity : public in_repository_entity
    {
    public:
        standard_in_repository_entity(const string& name = "", const string& description = "",
                                      repository* r = 0);
        virtual ~standard_in_repository_entity();

        virtual const string to_string() const;

        virtual string name() const
        {
            return name_;
        }

        virtual string description() const
        {
            return description_;
        }

        void set_name(const string& n)
        {
            name_ = n;
        }

        void set_description(const string& d)
        {
            description_ = d;
        }

        virtual const string short_label() const;
        virtual string_vector field_sequence() const;
        virtual string_map field_values() const;
        
    private:
        friend class boost::serialization::access;

        template<class Archive>
        void serialize(Archive & ar, const unsigned int version)
        {
            (void) version;
            ar & boost::serialization::base_object<in_repository_entity > (*this);
            ar & name_;
            ar & description_;
        }

        string name_;
        string description_;
    };
}

#endif	/* STANDARD_IN_REPOSITORY_ENTITY_HPP */

